package com.example.demo.proxy;

import com.example.demo.common.SearchParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

public interface DataProxy<T> {

     /**
      * 插入一条记录
      *
      * @param entity 实体对象
      */
     int save(T entity);

     int update(T entity);

     T get(Long id);

     List<T> list(SearchParam<T> searchParam);

     List<T> download(SearchParam<T> searchParam, HttpServletResponse response);

     List<T> upload(String model, MultipartFile file);

     void delete(List<Long> ids);

}
